<?php
/**
 *
 *@author Judasnow@gmail.com
 *@time 2010-3-28 to 2010-4-20
 *@version 1.2
 *@todo 
 */

class db_obj_user extends db_obj{

	public function __construct( $db ){
		
		parent::__construct( $db , 'user' , 'username' );
		
		$this->add('username' , '' );
		$this->add('passwd' , '' );
		$this->add('role' , '' );
		$this->add('email' , '');
		$this->add('signup_time' , '' );
		$this->add('last_signin_time','' );
		$this->add('last_signin_ipadd' , '' );
 
	}

	function username_exists( $username ){

		return $this->load( 'username' , $username );
	}	
}
